﻿#include <iostream>
#include "initrect.h"
using namespace std;

int main()
{
    String filename ="C:\\Users\\leeyoung\\Desktop\\GetRectInfo\\2015-03-19_00001.jpg";
    Mat image = imread(filename.c_str ());

    /**
     * @brief object init from cv::Mat
     */
    InitRect object(image,String("Window Title"));

    /**
     * @brief object init from image file
     */
//    InitRect object(filename,String("Window Title"));


    Rect myrect = object.Select ();
    // press ESC to finished Select

    printf ("x: %d y: %d width: %d height: %d",myrect.x,myrect.y,myrect.width,myrect.height);
    return 0;
}

